import json
from selenium import webdriver
import time

driver = webdriver.Firefox()
driver.get("https://login.taobao.com/")
time.sleep(15)
dictCookies = driver.get_cookies()
jsonCookies = json.dumps(dictCookies)

with open("cookies_tao.json", "w") as fp:
    fp.write(jsonCookies)
